package mvcc

func (c *DefaultRow) GetData() map[string]interface{} {
	return c.value
}

func (c *DefaultRow) GetRowId() int64 {
	return c.DbRowId
}

func (c *DefaultRow) SetValue(column string, value interface{}) {
	if c.value == nil {
		c.value = make(map[string]interface{})
	}
	c.value[column] = value
}

func (c *DefaultRow) SetValues(value map[string]interface{}) {
	if c.value == nil {
		c.value = make(map[string]interface{})
	}
	for k, v := range value {
		c.value[k] = v
	}
}

func (c *DefaultRow) SetRowId(id int64) {
	c.DbRowId = id
}

func (c *DefaultRow) SetTrId(id int64) {
	c.DbRtxId = id
}

func (c *DefaultRow) SetRollPtr(row IRow) {
	if row == nil {
		c.DbRowPtr = nil
		return
	}
	c.DbRowPtr = row.(*DefaultRow)
}

func (c *DefaultRow) GetTrId() int64 {
	return c.DbRtxId
}

func (c *DefaultRow) GetRollPtr() IRow {
	return c.DbRowPtr
}
